package entity;

import org.hibernate.annotations.*;
import org.hibernate.annotations.Cache;

import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * Created by xuweijie on 2017/4/20.
 * 优惠券总仓实体
 */
@Entity
@Table(name = "cro_coupons")
@DynamicInsert(true)
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class CroCoupons implements Serializable {
    private String id;
    private double uplimit;
    private double value;
    private String description;
    private String type;
    private String status;
    private String del_flag;
    private Date offdate;
    private int number;



    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getUplimit() {
        return uplimit;
    }

    public void setUplimit(double uplimit) {
        this.uplimit = uplimit;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public Date getOffdate() {
        return offdate;
    }

    public void setOffdate(Date offdate) {
        this.offdate = offdate;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(columnDefinition ="varchar(10) default '0'")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Column(columnDefinition ="varchar(10) default '0'")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(columnDefinition ="varchar(1) default '0'")
    public String getDel_flag() {
        return del_flag;
    }

    public void setDel_flag(String del_flag) {
        this.del_flag = del_flag;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }
}
